<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/common/meta.jsp"%>
</head>
<body>
	<script type="text/javascript" src="${ctx}/js/utils/swfupload/swfupload.js"></script>
	<div class="easyui-layout" data-options="fit:true">
		<form id="frame_manage_form" method="post" action="${ctx}/user/resetpass.do">
			<div data-options="region:'center',border:false" style="padding:10px 20px;">
				<div class="infoTable">
					<div class="infoItem">
						<span class="infoName">原密码</span>
						<input class="easyui-validatebox" type="password" name="oldPass" data-options="required:true,validType:'Password[6,50]'"/>
					</div>
					<div class="infoItem">
						<span class="infoName">新密码</span>
						<input id="newPassword" class="easyui-validatebox" type="password" name="user.loginPassword" data-options="required:true,validType:'Password[6,50]'"/>
					</div>
					<div class="infoItem">
						<span class="infoName">确认密码</span>
						<input id="newPasswordAgain" class="easyui-validatebox" type="password"/>
					</div>
					<a href="#" onclick="submitEditPassword(this)" type class="easyui-linkbutton">修改密码</a>
				</div>
			</div>
		</form>
	</div>
<script type="text/javascript">
$("#newPasswordAgain").validatebox({   
	required:true,
    validType:["PasswordAgain['#newPassword']", "Password[6,50]"]
});
function submitEditPassword(buttonObj) {
	frame.submitForm("frame_manage_form", buttonObj, function(res) {
        if (res.code == 1) {
        	msg.msg("密码修改成功.");
        	$("#frame_manage_form input").val("");
        } else {
        	msg.error(res.msg);
        }
    });
}
</script>
</body>
</html>